package org.baicaixiaozhan.learn.guava.collect;

import com.google.common.collect.BiMap;
import com.google.common.collect.HashBiMap;

/**
 * DESC: {@link BiMap} 示例
 *
 * @author baicaixiaozhan
 * @since 2020/11/13
 */
public class BiMapDemo {

    public static void main(String[] args) {

        BiMap<String, Integer> biMap = HashBiMap.create();
        biMap.put("张三", 20);

        System.out.println(biMap.inverse().get(20));
        System.out.println(biMap.get("张三"));
    }
}
